<?php
class Education_model extends CI_Model {

    function __construct()
    {
        parent::__construct();
    }
    
    function get($data)
    {
    	if (isset($data['idmember'])) {
    		$this->db->where('idmember', $data['idmember']);
    	}
    	
    	return $this->db->get('education')->row();
    }
    
	function insert($data)
    {
		$data_insert = array(
		   'name' => $data['name'],
		   'description' => $data['description'],
		   'idmember' => $data['idmember']
		);
		
		return $this->db->insert('education', $data_insert);
    }
}
?>